<?php
if($windowMsg) {
    $this->Html->scriptBlock($scriptWindowMsg, array('inline' => false));
}
?>
<div class="title-body-content"><?php echo $title_for_layout; ?></div>
<div class="wrapper-table clearfix">
    <table class="tbl-broking" border="1">
        <tr class="title-tbl" >
            <td class="td-id"><?php echo $this->Paginator->sort('id', '#'); ?></td>
            <td class="td-bank-name"><?php echo $this->Paginator->sort('Bank Name'); ?></td>
            <td class="td-bank-address"><?php echo __('Bank Address'); ?></td>
            <td class="td-bank-acc"><?php echo __('Bank Account'); ?></td>
            <td class="td-swift"><?php echo __('SWIFT'); ?></td>
            <td class="td-menu">&nbsp;</td>
            <td class="td-menu"><?php echo __('Actions'); ?></td>
        </tr>
        <?php
        foreach ($banks AS $bank) {
            $actions = '<li>' . $this->Html->link(__('Edit'), array(
                        'controller' => 'banks',
                        'action' => 'edit',
                        $bank['Bank']['id'],
                    )) . '</li>';
            $actions .= ' ' . $this->Layout->adminRowActions($bank['Bank']['id']);
            $actions .= ' <li><div class="space3">|</div>' . $this->Html->link(__('Delete'), array(
                        'controller' => 'banks',
                        'action' => 'delete',
                        $bank['Bank']['id'],
                        'token' => $this->params['_Token']['key'],
                            ), null, __('Are you sure?')) . '</li>';

            echo '
                    <tr class="line-content-tbl" >
                        <td class="td-id">' . $bank['Bank']['id'] . '</td>
                        <td class="td-bank-name">' . $bank['Bank']['name'] . '</td>
                        <td class="td-bank-address">' . $bank['Bank']['address'] . '</td>
                        <td class="td-bank-acc">' . $bank['Bank']['account'] . '</td>
                        <td class="td-swift">' . $bank['Bank']['swift_code'] . '</td>
                        <td class="td-menu">
                            '.$this->Html->link(__('Insert'), '#', array('class' => 'childButton', 'id' => $bank['Bank']['id'], 'title' => $bank['Bank']['name'], 'rel' => $t_bank)).'
                        </td>
                        <td class="td-action">
                            <ul>
                                ' . $actions . '
                            </ul>
                        </td>
                    </tr>';
        }
        ?>
    </table>
    <div class="wrapper-paging">
        <ul class="ul-paging">
            <?php echo $this->Paginator->numbers(array('tag' => 'li', 'separator' => '')); ?>
        </ul>
        <?php echo $this->Paginator->counter(array('format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%'))); ?>
    </div>
    <div class="wrapper-button-form">
        <div class="button-form">
            <div class="button-aihre button-blue"><?php echo $this->Html->link(__('NEW'), array('action' => 'add')); ?></div>
        </div>
    </div>
</div>
